# -*- coding: utf-8 -*-
'''
Created on 2012-12-1

@author: yangxiao
'''
import re
from dtcommon import *
 
def getSubtitle(url):
    """获取bili的弹幕文件,返回str"""
    html=getHtml(url)
    ma=re.search(u'cid=([0-9]+)',html)
    url="http://comment.bilibili.tv/%s.xml"%(ma.groups()[0])
    return getHtml(url),url

 
    
    
    